package com.ys;

/**
 * @program: note
 * @description:
 * @author:
 * @create 2020-06-11 21:49
 **/
public class ConsumeRecord {
    // 时间
    private String time;

    // 物品名称
    private String name;

    // 单价
    private Double price;

    // 数量
    private Integer num;

    // 类别
    private String type;

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static String getTitle() {
        return new StringBuilder().append("#时间")
                .append("\t").append("名称")
                .append("\t").append("单价")
                .append("\t").append("数量")
                .append("\t").append("类型")
                .append('\n')
                .toString();
    }

    @Override
    public String toString() {
        return new StringBuilder().append(time)
                .append("\t").append(name)
                .append("\t").append(price)
                .append("\t").append(num)
                .append("\t").append(type)
                .append('\n')
                .toString();
    }
}
